﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO.Ports;

namespace VIB
{
    class Scanner
    {
        public readonly SerialPort Port = new SerialPort();

        public static readonly Scanner Instance = new Scanner();

        private Scanner()
        {
            Port.PortName = Properties.Settings.Default.Port;   
            Port.BaudRate = Properties.Settings.Default.BaudRate;
            Port.Parity = Properties.Settings.Default.Parity;
            Port.StopBits = Properties.Settings.Default.StopBits;
            Port.DataBits = Properties.Settings.Default.DataBits;
            Port.Handshake = Properties.Settings.Default.Handshake;
            Port.ReceivedBytesThreshold = 16;
            Port.DtrEnable = true;
            
            Port.Open();
        }
    }
}
